package ua.vn.ticket_scanner.network.task.http;

import org.json.JSONException;

import ua.vn.ticket_scanner.network.data.JSONKeys;
import ua.vn.ticket_scanner.user.UserData;

/**
 * Created by Ivan on 20.06.13.
 */
public class LoginTask extends BaseTask {

    private final String mName;
    private final String mPassword;

    public LoginTask(String name, String password) {
        super(false);
        this.mName = name;
        this.mPassword = password;
    }

    @Override
    protected void makeJSON() {
        try {
            putJSON(JSONKeys.CMD,           "login");
            putJSON(JSONKeys.CONTROLLER_ID, mName);
            putJSON(JSONKeys.SECRET_KEY,    mPassword);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
}
